Release 10.1A: OpenEdge Development:
Progress 4GL Reference
UNIX statement
Runs a program, UNIX command ,or UNIX script, or starts a UNIX interactive shell to allow interactive processing of UNIX commands.
Syntax
SILENTAfter processing a UNIX statement, the Progress shell pauses and prompts you to press SPACEBAR to continue. You can use the SILENT option to eliminate this pause. Use this option only if you are sure that the UNIX program, command, or batch file does not generate any output to the screen.
command-token| VALUE (expression)One or more command (
Examplescommand-token) words and symbols that you want to pass the UNIX operating system to execute. The VALUE option generates the command tokens included inexpression, a character string expression. The specified combination ofcommand-tokenand VALUE (expression) options can form any legal combination of commands and command options permitted by UNIX, including programs, built-in commands, and scripts. If you do not use any of these options, the UNIX statement invokes the UNIX shell and remains there until you press CTRL+D or the EOF character set by the UNIXsttycommand.On UNIX, procedure
r-unix.pstarts a shell and in it runs the UNIX “ls” command. In Windows, this procedure starts a command processor and in it runs the DOS “dir” command:
In
r-unx.p, if you type an L, Progress runs the DOSdircommand or the UNIXlscommand. If you enter a procedure name that is stored in the proc variable, the RUN statement then runs the procedure.
Notes
- If you are using Windows and you use the UNIX statement in a procedure, that procedure will compile. The procedure will run as long as flow of control does not pass through the UNIX statement.
- This command does not exit to UNIX and return. It creates a shell within Progress to execute the command. Thus, you cannot use the UNIX statement as a substitute for the QUIT statement.
- When you use the UNIX
cpcommand as a Progress statement, Progress assumes that a period (.) indicates the end of the statement. This causes thecpcommand to display a message stating that it requires two arguments. For example, Progress uses the period as the end of the statement indicator:
To use the period as part of a UNIX command, enclose the command in quotation marks. For example:
See also
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |